package ms.jasim.pddl;

import ms.utils.INamedItem;

public class PddlObject implements INamedItem, Comparable<PddlObject> {

	private String name;
	private PddlObjectType type;
	private int instanceID;
	
	public PddlObject() {
	}
	
	public PddlObject(String name, PddlObjectType type) {
		this.name = name;
		this.type = type;
	}
	
	@Override
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setType(PddlObjectType type) {
		this.type = type;
	}

	public PddlObjectType getType() {
		return type;
	}

	@Override
	public String toString() {
		return String.format("%s", getName(), this.instanceID);
	}
	
	@Override
	public int compareTo(PddlObject o) {
		return String.CASE_INSENSITIVE_ORDER.compare(name, o.name);
	}

	
	public void setInstanceID(int i) {
		this.instanceID = i;
	}

	
}
